<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>国际象棋棋盘</title>
</head>

<style type="text/css">
    table {
        border: 1px solid #000;
        border-collapse: collapse;
    }

    td {
        border: 1px solid #000;
        width: 50px;
        height: 50px;
    }

    .black {
        background: black;
    }


</style>
<body>
<table>
    <?php
        for ($i = 1; $i <= 5; $i++) {
            echo '<tr>';
            for ($j = 1; $j <= 5; $j++) {
                if ($i / 4 != 0) {
                    echo '<td class="black"></td><td></td>';
                } else {
                    echo '<td ></td><td class="black"></td>';
                }
            }

            echo '</tr>';
            echo '<tr>';
            for ($j = 1; $j <= 5; $j++) {
                if ($i / 4 == 0) {
                    echo '<td class="black" ></td><td ></td>';
                } else {
                    echo '<td ></td><td class="black" ></td>';
                }
            }

            echo '</tr>';
        }

    ?>

</table>
</body>
</html>